package com.chen.mapper;

import com.chen.popj.entity.JudgeCase;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface JudgeCaseMapper {

    /**
     * 添加判题测试点
     *
     * @param judgeCases
     */
    void addJudgeCase(List<JudgeCase> judgeCases);

    /**
     * 根据题目id获取判题测试点信息
     *
     * @param problemId
     * @return
     */
    @Select("select * from judge_case where problem_id = #{problemId}")
    List<JudgeCase> getJudgeCase(Integer problemId);

    /**
     * 根据题目id获取判题测试点输入
     *
     * @param problemId
     * @return
     */
    @Select("select input from judge_case where problem_id = #{problemId}")
    List<String> getInput(Integer problemId);

}
